import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/index'
import dataV from '../node_modules/@jiaminghi/data-view'
Vue.use(dataV)  
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// 按需引入vue-awesome图标
import Icon from 'vue-awesome/components/Icon';
import 'vue-awesome/icons/chart-bar.js';
import 'vue-awesome/icons/chart-area.js';
import 'vue-awesome/icons/chart-pie.js';
import 'vue-awesome/icons/chart-line.js';
import 'vue-awesome/icons/align-left.js';

// 全局注册图标
Vue.component('icon', Icon);

// 适配flex
import '@/common/flexible.js';
// 引入classie.js
import '@/common/classie.js';

// 引入全局css
import './assets/scss/style.scss';
// import './assets/global.css'


//引入echart
import echarts from 'echarts'
import 'cesium/Widgets/widgets.css'

Vue.prototype.$echarts = echarts

import axios from 'axios'
// 配置请求的根路径
axios.defaults.baseURL = 'http://192.168.100.170:8888/api/private/v1/'
axios.interceptors.request.use(config =>{
  config.headers.Authorization = window.sessionStorage.getItem('token')
  // 固定写法，在最后return config
  return config
})

Vue.prototype.$http = axios

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
